package cn.com.dcsgo.mapper;

import cn.com.dcsgo.model.activity.CouponInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 优惠券信息 Mapper 接口
 * </p>
 *
 * @author Dcsgo
 * @since 2025-04-19
 */
@Repository
public interface CouponInfoMapper extends BaseMapper<CouponInfo> {

    /**
     * 根据 skuId 分类id userId 查询优惠券信息
     *
     * @param skuId      skuId
     * @param categoryId categoryId
     * @param userId     userId
     * @return 优惠券信息列表
     */
    List<CouponInfo> selectBySkuIdAndCategoryAndUserId(@Param("skuId") Long skuId,
                                                       @Param("categoryId") Long categoryId,
                                                       @Param("userId") Long userId);
}
